<wx:page
 class="x-page"
 id="page"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on"
 xmlns:wx="$UI/wxsys/comps"
 xmlns:wxPayComp="$UI/comp/wxPay/components">
<wx:model
 id="model"
 style="left:0px;top:0px;height:auto;position:absolute">
<wx:wxApi
 id="wxapi"
 label="通用接口"/>
<wx:commonOperation
 id="commonOperation"
 label="操作扩展"
 xmlns:wx="$UI/wxsys/comps"/>
<wx:restData
 _created="true"
 _orderBy_label="下单时间:降序"
 auto="load"
 className="/main/dingdan"
 confirmDeleteText="确定要删除这个订单吗？"
 confirmRefresh="false"
 id="restData1"
 label="订单"
 orderBy="fxiadansj:desc"
 url="/dbrest">
<filter
 _filter_label="用户 等于 restData2.current.id/*{&quot;dependencies&quot;:[&quot;user&quot;]}*/"
 id="restDatafilter"
 name="_system1_">eq('fyonghu',restData2.current.id/*{&quot;dependencies&quot;:[&quot;user&quot;]}*/)</filter></wx:restData>
<wx:tableData
 auto="load"
 className="/main/linshisj"
 id="tableData"
 label="临时数据"/></wx:model>
<wx:loading
 class="weui-loader-full {{$state.loadingNum &lt;= 0 ?'weui-loader-hide':''}}"
 style="z-index: 10001;"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on"
 xmlns:wx="$UI/wxsys/comps">
<view
 class="ball-scale-ripple-multiple">
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/></view></wx:loading>
<wx:inVisibleCompContainer
 id="inVisibleCompContainer">
<wx:user
 appPath="$UI/main"
 autoLoadUserInfo="true"
 autoLogin="true"
 id="user"
 useOpenid="false">
<wx:restData
 _created="true"
 className="uaa/user"
 columns="id,name,email,userName,phone,avatarUrl,description,data4,data5,data9,data15,data17,data2,data3,data6"
 id="restData2"
 label="用户信息"
 owner="user"
 xmlns:wx="$UI/wxsys/comps">
<column
 id="default0"
 label="昵称"
 name="nickName"
 type="String"/>
<column
 id="default1"
 label="群组"
 name="group"
 type="Array"/>
<column
 id="default2"
 label="是否登录"
 name="isLogined"
 type="Boolean"/>
<rule
 id="rule">
<readonly
 id="default3">
<expr
 id="default4">true</expr></readonly></rule></wx:restData></wx:user>
<wxPayComp:wxPay
 appPath="$UI/main"
 id="wxPay"
 outTradeno="tableData.current.fzifu"
 productName="tableData.current.fzifu2"
 shopName="&quot;鱼香瓜瓢二手交易平台&quot;"
 totalFee="tableData.current.ffudians1"></wxPayComp:wxPay>
<wx:code
 _autogena="1"
 class=" x-inline-code"
 id="button1TapCallback"
 params="[{&quot;label&quot;:&quot;事件对象&quot;,&quot;type&quot;:&quot;$UI/wxsys/comps/button/button#tap&quot;,&quot;value&quot;:&quot;event&quot;,&quot;displayName&quot;:&quot;事件对象&quot;,&quot;name&quot;:&quot;event&quot;}]"
 type-label-info="{&quot;$UI/wxsys/comps/button/button#tap&quot;:&quot;点击事件&quot;}"
 xid="button1TapCallback"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<script
 id="script"
 type="code/model"><![CDATA[
<root><imports/><function  id="function1" name="code"><params  id="params1"><param  id="event" type="$UI/wxsys/comps/button/button#tap" label="事件对象">event</param></params><method  id="method1"><start  id="start1" label="开始"/><line  id="start1|splitActivity1" label="" from="start1" to="splitActivity1"/><split  id="splitActivity1" label="是否待支付" condition="event.context.listitem.fdingdanzt == &quot;待支付&quot;"><when  id="splitActivity1|splitActivity2" label="假" is="false" from="splitActivity1" to="splitActivity2" error="none"><split  id="splitActivity2" label="是否待收货" condition="event.context.listitem.fdingdanzt == &quot;待收货&quot;"><when  id="splitActivity2|splitActivity3" label="假" is="false" from="splitActivity2" to="splitActivity3" error="none"><split  id="splitActivity3" label="是否完成" condition="event.context.listitem.fdingdanzt == &quot;完成&quot;" error="error"/></when></split></when><when  id="splitActivity1|invokeActivity1" label="" is="" from="splitActivity1" to="invokeActivity1"><invoke  id="invokeActivity1" label="多列赋值1" async="false" type="COMPONENT" error="error"><value>{"target":"tableData","path":"$UI/wxsys/comps/tableData/tableData","name":"fieldsValue","funType":"multiLine"}</value><output  declare="false" type="void"></output><args><arg  id="C85CE11666F000016579A9591F904840" name="row" type="$UI/wxsys/comps/tableData/tableData#Row" label="行">{"value":"","label":""}</arg><arg  id="C85CE116670000015467655A1994DFF0" name="options" type="Any" label="赋值参数">{"value":"","label":""}</arg></args></invoke></when></split></method></function></root>]]></script>
<script
 id="script1"
 type="code/diagram"><![CDATA[{"version":"2","shapeStyle":{"start1":{"shape":{"x":63,"y":316.5,"w":22,"h":25},"pid":"method1","issel":"","iconurl":"","LABEL":"1"},"event":{"shape":{"x":80,"y":10,"w":30,"h":20},"pid":"params1","issel":"","iconurl":"","LABEL":"new"},"splitActivity1":{"shape":{"x":156,"y":299,"w":150,"h":60},"pid":"method1","issel":"","iconurl":"","LABEL":"1"},"start1|splitActivity1":{"LABEL":"1","issel":"","outPortDir":"e","inPortDir":"w","targetNode":"splitActivity1","sourceNode":"start1","shape":[{"x":84,"y":329},{"x":155,"y":329}]},"splitActivity2":{"shape":{"x":356,"y":214,"w":150,"h":60},"pid":"method1","issel":"","iconurl":"","LABEL":"1"},"splitActivity1|splitActivity2":{"LABEL":"1","issel":"","iconurl":"","outPortDir":"n","inPortDir":"w","targetNode":"splitActivity2","sourceNode":"splitActivity1","shape":[{"x":231,"y":298},{"x":231,"y":244},{"x":355,"y":244}]},"splitActivity3":{"shape":{"x":556,"y":129,"w":150,"h":60},"pid":"method1","issel":"","iconurl":"","LABEL":"1"},"splitActivity2|splitActivity3":{"LABEL":"Refresh","issel":"","iconurl":"","outPortDir":"n","inPortDir":"w","targetNode":"splitActivity3","sourceNode":"splitActivity2","shape":[{"x":431,"y":213},{"x":431,"y":159},{"x":555,"y":159}]},"invokeActivity1":{"shape":{"x":356,"y":384,"w":120,"h":60},"pid":"method1","issel":true,"iconurl":"","LABEL":"Refresh"},"splitActivity1|invokeActivity1":{"LABEL":"","issel":"","outPortDir":"s","inPortDir":"w","targetNode":"invokeActivity1","sourceNode":"splitActivity1","shape":[{"x":231,"y":358},{"x":231,"y":414},{"x":355,"y":414}]}},"processFile":""}]]></script></wx:code></wx:inVisibleCompContainer>
<wx:navbar
 activeBar="bar"
 activeClass="c-red"
 class="navbar weui-navbar"
 id="navbar"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<wx:bar
 class="weui-navbar__item"
 id="bar"
 xmlns:wx="$UI/wxsys/comps">
<wx:label
 class="weui-navbar__title"
 id="label"
 xmlns:wx="$UI/wxsys/comps">全部</wx:label></wx:bar>
<wx:bar
 class="weui-navbar__item"
 id="bar1"
 xmlns:wx="$UI/wxsys/comps">
<wx:label
 class="weui-navbar__title"
 id="label1"
 xmlns:wx="$UI/wxsys/comps">待支付</wx:label></wx:bar>
<wx:bar
 class="weui-navbar__item"
 id="bar2"
 xmlns:wx="$UI/wxsys/comps">
<wx:label
 class="weui-navbar__title"
 id="label2"
 xmlns:wx="$UI/wxsys/comps">待确认</wx:label></wx:bar>
<wx:bar
 class="weui-navbar__item"
 id="bar3">
<wx:label
 class="weui-navbar__title"
 id="label3"
 xmlns:wx="$UI/wxsys/comps">待收货</wx:label></wx:bar>
<wx:bar
 class="weui-navbar__item"
 id="bar4">
<wx:label
 class="weui-navbar__title"
 id="label4"
 xmlns:wx="$UI/wxsys/comps">完成</wx:label></wx:bar></wx:navbar>
<wx:listView
 id="listView">
<wx:scrollView
 id="scrollView"
 xmlns:wx="$UI/wxsys/comps">
<wx:loading
 class="weui-loader-item {{$state.reachBottom ?'weui-loader-hide':''}}"
 id="loading"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on"
 xmlns:wx="$UI/wxsys/comps">
<view
 class="ball-beat"
 id="view">
<view
 class="weui-loader-view"
 id="view1"/>
<view
 class="weui-loader-view"
 id="view2"/>
<view
 class="weui-loader-view"
 id="view3"/></view></wx:loading>
<wx:list
 _created="true"
 id="list"
 index="listindex"
 item="listitem"
 items="restData1.value"
 label="订单列表"
 xmlns:wx="$UI/wxsys/comps">
<view
 id="view4">
<wx:row
 class="x-row"
 id="row">
<wx:col
 class="x-col x-col-fixed"
 id="col">
<wx:text
 id="text">订单号：</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col1">
<wx:text
 id="text1">值</wx:text></wx:col>
<wx:col
 class="x-col x-col-fixed"
 id="col12">
<wx:button
 class="wx-btn wx-btn-noborder wx-btn-only-label wx-btn-icon-bottom"
 id="button"
 plain="true"
 size="mini">
<wx:icon
 id="icon"
 size="15"
 type="wx-btn-icon"/>
<view
 class="wx-btn-label"
 id="view5">投诉</view></wx:button></wx:col>
<wx:col
 class="x-col x-col-fixed"
 id="col2"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<wx:text
 id="text2"
 style="color:#fa6868;font-weight: bold;font-size:18px">状态值</wx:text></wx:col></wx:row>
<wx:row
 class="x-row"
 id="row1">
<wx:col
 class="x-col x-col-fixed x-col-center"
 id="col3">
<wx:image
 class="weui-img"
 id="image"
 mode="scaleToFill"
 style="width:64px;height:64px"/></wx:col>
<wx:col
 class="x-col"
 id="col4">
<wx:text
 id="text3"
 style="display:block">商品名：</wx:text>
<wx:text
 id="text4"
 style="display:block">价格：</wx:text>
<wx:row
 class="x-row"
 id="row3">
<wx:col
 class="x-col"
 id="col10"/>
<wx:col
 class="x-col x-col-fixed"
 id="col11">
<wx:text
 id="text5">实付：￥</wx:text>
<wx:text
 id="text6">金额</wx:text></wx:col></wx:row></wx:col></wx:row>
<wx:row
 class="x-row"
 id="row2">
<wx:col
 class="x-col"
 id="col6"/>
<wx:col
 bind:hidden="wx.Util.iif(listitem.fdingdanzt==&quot;待支付&quot;&amp;&amp;listitem.fdingdanzt==&quot;完成&quot;,false,true)"
 class="x-col x-col-fixed"
 id="col7">
<wx:button
 class="wx-btn"
 id="button2"
 plain="true"
 size="mini"
 style="color:#fa6868"
 type="warn">
<wx:icon
 id="icon2"
 size="15"
 type="wx-btn-icon"/>
<view
 bind:text="wx.Util.iif(listitem.fdingdanzt==&quot;待支付&quot;,&quot;取消订单&quot;,wx.Util.iif(listitem.fdingdanzt==&quot;完成&quot;,&quot;删除订单&quot;,&quot;按钮1&quot;))"
 class="wx-btn-label"
 id="view7">左侧按钮</view></wx:button></wx:col>
<wx:col
 bind:hidden="wx.Util.iif(listitem.fmaijiapj!=&quot;&quot;,true,false)"
 class="x-col x-col-fixed"
 id="col8">
<wx:button
 bind:disabled="wx.Util.iif(listitem.fdingdanzt==&quot;待确认&quot;,true,false)"
 class="wx-btn"
 id="button1"
 on:tap="{&quot;args&quot;:{&quot;event&quot;:&quot;js:$event&quot;},&quot;operation&quot;:&quot;button1TapCallback.customOperation&quot;,&quot;type&quot;:&quot;customOperation&quot;}"
 plain="true"
 size="mini"
 type="primary">
<wx:icon
 id="icon1"
 size="15"
 type="wx-btn-icon"/>
<view
 bind:text="wx.Util.iif(listitem.fdingdanzt==&quot;待支付&quot;,&quot;立即支付&quot;,wx.Util.iif(listitem.fdingdanzt==&quot;待确认&quot;,&quot;请等待卖家确认收款&quot;,wx.Util.iif(listitem.fdingdanzt==&quot;待收货&quot;,&quot;确认收货&quot;,wx.Util.iif(listitem.fdingdanzt==&quot;完成&quot;,&quot;立即评价&quot;,&quot;按钮&quot;))))"
 class="wx-btn-label"
 id="view6">右侧按钮</view></wx:button></wx:col></wx:row></view></wx:list></wx:scrollView></wx:listView>
<resource
 id="resource">
<require
 id="require"
 url="css!$UI/main/common.css"/></resource></wx:page>___js___:import PageImpl from "$UI/wxsys/lib/base/pageImpl";var app = getApp();export default class IndexPage extends PageImpl {constructor(...args){super(...args);}

	
  button1TapCallback(event){
        let regeneratorRuntime = require('$UI/wxsys/comps/code/generator/runtime-module');
        "use strict";

        //当前函数的代码为自动生成,请勿手动修改!!!

        function code(event) {
            if (!(event.context.listitem.fdingdanzt == "待支付")) {
                if (!(event.context.listitem.fdingdanzt == "待收货")) {
                    if (!(event.context.listitem.fdingdanzt == "完成")) {
                        return;
                    } else if (event.context.listitem.fdingdanzt == "完成") {
                        this.comp('serviceRequest1').send({
                            "orderID": event.context.listitem.fid
                        });
                    }
                } else if (event.context.listitem.fdingdanzt == "待收货") {
                    this.comp('serviceRequest').send({
                        "orderID": event.context.listitem.fid,
                        "state": "完成"
                    });
                    this.comp('restData1').refreshData({
                        "append": false,
                        "confirm": false
                    });
                }
            } else if (event.context.listitem.fdingdanzt == "待支付") {
                this.comp('tableData').fieldsValue(undefined, {
                    "fzifu": event.context.listitem.fdingdanh,
                    "fzifu2": event.context.listitem.fshangpinid_shangpin1_fmingcheng,
                    "ffudians1": event.context.listitem.fshangpinid_shangpin1_fjiage
                });
                this.comp('wxPay').sendPay();
            }
        }
        return code.apply(this, arguments);
    }








	}